To improve fault detection in software, software engineers typically add instrumentation code to software components (application software, drivers, and the like) so that code-tracing data is generated automatically by the instrumentation code as the software components execute. The instrumentation code typically generates code-tracing data when certain functions are performed, status changes occur, and the like. A trace manager is used to store the code-tracing data generated by the instrumentation code in a log file.
If a fault occurs, then the log file can be analyzed to identify the cause of the fault. For example, the code-tracing data may indicate if any unexpected events occurred, or if any expected events did not occur, prior to the fault occurring.
Although generating and storing code-tracing data has clear advantages, there are also problems associated with managing code-tracing data.
One problem is that instrumentation code can produce a large amount of code-tracing data every second, which consumes valuable storage space and may slow down the operation of the software as the log file is written to disk. Furthermore, the large quantity of code-tracing data produced makes it difficult to identify the code-tracing data that is relevant to an error. Other errors may be detected that are irrelevant to, and may obscure, the error being targeted.
It would be advantageous to overcome or mitigate some of these disadvantages, or other disadvantages associated with managing code-tracing data.